<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>评分</title>
    <link rel="stylesheet" href="/static/css/layui.css">
    <style>
        @media screen and (max-width: 450px) {
            .layui-card-header{
                font-size: 14px !important;
            }
        }
        .layui-form-radio *{
            font-size: 20px !important;
        }
    </style>
</head>
<body style="padding-left: 10px;padding-right: 10px;">
<!--<div class="searchTable">-->
<!--    <form class="layui-form" onsubmit="return false">-->
<!--        <div class="layui-form-item" style="width:250px">-->
<!--            <label class="layui-form-label">是否评分：</label>-->
<!--            <div class="layui-input-block">-->
<!--                <select class="layui-select" id="status" lay-filter="search">-->
<!--                    <option class="layui-select-group" selected="selected" value="0">未评分</option>-->
<!--                    <option class="layui-select-group" value="1">已经评分</option>-->
<!--                </select>-->
<!--            </div>-->
<!--        </div>-->
<!--        <button id="searchBtn" style="margin-left: 10%;display: none" class="layui-btn" data-type="reload"></button>-->
<!--    </form>-->
<!--</div>-->

<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>请对其评分</legend>
</fieldset>
<blockquote class="layui-elem-quote" style="font-size: 20px;" th:text="${scoreText}"></blockquote>

<div class="layui-bg-gray" style="padding: 30px;" lay-filter="tool">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md6" th:each="task,iterStat : ${taskList}">
            <center class="layui-card">
                <strong><div class="layui-card-header" th:text="${task.name}" style="font-size: 30px;line-height: 60px;height: 60px;"></div></strong>
                <div class="layui-card-body">
                    <span style="font-size: 20px">您的评分：</span><strong th:if="${task.score} == 0"><span th:text="待评价" style="color:#ea8372;font-size: 40px"></span><br></strong>
                    <strong th:if="${task.score < 60 && task.score != 0}"><span style="color:#f60808;font-size: 26px" th:text="${task.score}"></span><br></strong>
                    <strong th:if="${task.score >= 60}"><span th:text="${task.score}" style="color:#098ace;font-size: 26px"></span><br></strong>
                    <span style="font-size: 20px">截至日期：</span><span th:text="${#dates.format(task.endTime, 'yyyy-MM-dd')}" style="font-size: 20px"></span><br>
                    <span th:if="${task.score != 0}">还能修改的次数：</span><span th:if="${task.score != 0}" th:text="${task.count}" style="font-size: 15px"></span><br>
                </div>
                <center style="padding-bottom: 20px">
                    <a th:if="${task.status == '0'}" class="layui-btn layui-btn-ms" lay-active="grade"
                       th:data-id="${task.uid}"
                       th:data-name="${task.name}"
                       th:data-year="${task.year}"
                    >评分</a>
                    <a th:if="${task.status == '0' || task.count != 0}" class="layui-btn layui-btn-ms layui-border-blue layui-btn-primary" lay-active="show"
                       th:data-id="${task.reportUid}"
                       th:data-name="${task.name}"
                       th:data-year="${task.year}"
                    >查看年度工作总结</a><br>
                    <a th:if="${task.status == '1' && task.count == 0}" class="layui-btn layui-btn-primary layui-border-red layui-btn-ms" disabled>已评分</a>
                    <a th:if="${task.status == '1' && task.count == 0}" class="layui-btn layui-btn-ms layui-border-blue layui-btn-primary" lay-active="show"
                       th:data-id="${task.reportUid}"
                       th:data-name="${task.name}"
                       th:data-year="${task.year}"
                    >查看年度工作总结</a><br>
                    <a th:if="${task.status == '1' && task.count != 0}" class="layui-btn layui-btn-primary layui-border-green layui-btn-ms" lay-active="grade"
                       th:data-id="${task.uid}"
                       th:data-name="${task.name}"
                       th:data-year="${task.year}">修改评分</a>
                    <a th:if="${task.status == '2'}" class="layui-btn layui-btn-primary layui-border-red layui-btn-ms" disabled>已结束</a><br>
                    <textarea th:if="${task.status == '1' && task.score < 60}" style="font-size: 18px;padding: 18px" cols="60" rows="2" th:text="${task.context}" disabled></textarea>
                </center>
            </center>
        </div>
    </div>
</div>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script src="/static/layui.js" type="text/javascript"></script>
<script src="/static/js/score.js" type="text/javascript"></script>
<form class="layui-form" style="display: none" id="commentForm" onsubmit="return false" lay-filter="scoreForm">
    <div class="layui-form-item" style="width: 70%;margin-top: 20px">
        <label class="layui-form-label">请打分：</label>
        <div class="layui-input-block">
            <input class="layui-input" id="score" name="score" type="text" style="text-align: center" oninput="if(value>100){value=100}else{value=value.replace(/[^\d]/g,'')}if(value.indexOf(0)==0){value=0}" required=""
                   aria-required="true">
        </div>
        <input id="context" type="hidden" name="context">
    </div>
    <input id="uid" name="uid" type="hidden" value="">
</form>
</body>
</html>